# Maintainer: Chih-Hsuan Yen <yan12125@archlinux.org>
# Contributor: Guillaume Horel <guillaume.horel@gmail.com>

pkgname=python-jsondiff
_pkgname=jsondiff
pkgver=2.0.0
pkgrel=3
pkgdesc='Diff JSON and JSON-like structures in Python'
arch=(any)
url='https://github.com/xlwings/jsondiff'
license=(MIT)
depends=(python)
makedepends=(python-setuptools)
checkdepends=(python-nose python-nose-random)
source=("https://github.com/xlwings/jsondiff/archive/$pkgver/jsondiff-$pkgver.tar.gz")
sha256sums=('5cf3dfb212dcdc6ee104f40e30824a2f3ddaa05938d111ce0eea6646518b8339')

build() {
  cd $_pkgname-$pkgver
  python setup.py build
}

check() {
  cd $_pkgname-$pkgver
  nosetests -v tests
}

package() {
  cd $_pkgname-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}
